<?php 
include('header.php');
?>

<?php
if(isset($_POST['submit']))
{
	$file="vktechzonemsg.html";
	echo file_exists($file);
	if(file_exists($file) == 0)
	{
		$fp=fopen($file,"w");
		fwrite($fp,"");
		fclose($fp);
	}
	$fp=fopen($file,"a+");
	$text=$_POST['start'];
	fwrite($fp,$text);
	$text2=$_POST['msg']."</li><br/>\n";
	fwrite($fp,$text2);
	$text3=$_POST['decoline']."\n";
	fwrite($fp,$text3);
	fclose($fp);
	
	$report="Thanks succesfully your Message Added in Data File";
}
?>


<!DOCTYPE html>

<head>
<title>Data File maker</title>
</head>

<body><br/><br/>
<center>
<form action="vktechzone.php" method="post">
<table height="auto" width="300px" border="1px">
<tr><td>
	<table>
	<tr>
	<textarea rows="3" name="msg" id="msg" class="span6" placeholder="Your Comment Here"></textarea>
    </tr>
	 <tr>
    <td><input hidden="text" id="decoline" name="decoline" value="&lt;div class=&quot;deco-line&quot;&gt;
&lt;/div&gt;" placeholder="start" </td>
    </tr>
	 <tr>
    <td><input hidden="text" id="start" name="start" value="&lt;li&gt;" placeholder="start" </td>
    </tr>
	<center> <button name="submit" type="submit" class="btn btn-info"><i class="icon-share"></i>&nbsp;Add Message in Data File</button></center>


	
   </table>
</td></tr>
</table>
</form>

<table width="50%" border="1">
<tr><td colspan="2"><h3 style="color:green" align="center" ><?php echo $report ?></h3></td></tr>
  <tr>
    <td>Message</td>
    <td><?php echo $_POST['msg'] ?></td>
  </tr>
</table>

</center>
<a href="vktechzonemsg.html" target="_blank">Go to page</a>
</body>
</html>